﻿Imports System.Data
Partial Class Empresas_ConEvaluacion_ConEvaluacion
    Inherits PaginaComun

    Protected Sub ImageButton1_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles ImageButton1.Click
        Dim obj As New Ofertas
        Dim eva As New Evaluaciones
        Dim dt As DataTable = obj.GetOfertabyConEval(TxtBusc.Text)
        If dt.Rows.Count > 0 Then
            HfCedula.Value = dt.Rows(0)("ID").ToString
            FormView1.DataBind()
            Dim tb As DataTable = eva.GetbyPK(dt.Rows(0)("ID").ToString, CmbTipEval.SelectedValue)
            If tb.Rows.Count > 0 Then
                TxtPunt.Text = tb.Rows(0)("Puntualidad").ToString
                TxtImg.Text = tb.Rows(0)("Imag_Pres_Pers").ToString
                TxtExp.Text = tb.Rows(0)("Expre_Verb_Esc").ToString
                TxtMan.Text = tb.Rows(0)("Man_Apli_Offi").ToString
                TxtResp.Text = tb.Rows(0)("Responsabilidad").ToString
                TxtInt.Text = tb.Rows(0)("Inte_Equi_Tra").ToString
                TxtRec.Text = tb.Rows(0)("Recomendaciones_Eva").ToString
                TxtConsi.Text = tb.Rows(0)("Raz_Consi").ToString
                TxtEval.Text = tb.Rows(0)("Evaluador").ToString
                TxtCargo.Text = tb.Rows(0)("Cargo_Eval").ToString
                If Util.N1_0(tb.Rows(0)("Considera").ToString) = True Then
                    LbSi.Text = LbSi.Text & " [X]"
                    LbNo.Text = LbNo.Text & " [ ]"
                Else
                    LbSi.Text = LbSi.Text & " [ ]"
                    LbNo.Text = LbNo.Text & " [X]"
                End If
                TxtTipEval.Text = tb.Rows(0)("Tip_Eval").ToString
                Me.MultiView1.ActiveViewIndex = 1
            Else
                MsgModalPanel.Text = "No existe evaluación <strong>" & CmbTipEval.SelectedValue & "</strong> Registrada para el estudiante"
                ModalPopup.Show()
            End If
        Else
            MsgModalPanel.Text = "No existe evaluación <strong>" & CmbTipEval.SelectedValue & "</strong> Registrada para el estudiante"
            ModalPopup.Show()
        End If
        
    End Sub

    Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles LinkButton1.Click
        Me.MultiView1.ActiveViewIndex = 0
        limpiar()
    End Sub
    Sub limpiar()
        LbSi.Text = "SI"
        LbNo.Text = "NO"
    End Sub
End Class
